package com.yanqu.road.server.timer.splitflow;

import com.yanqu.road.logic.redis.RedisServerRegisterPlayerNumHelper;
import com.yanqu.road.server.manger.player.UserMgr;
import com.yanqu.road.utils.ConfigHelper;
import com.yanqu.road.utils.executor.GeneralTask;

/**
 * @Author wpj
 * @Date 2020/11/14
 */
public class UploadRegisterNumToRedisTask extends GeneralTask {

    @Override
    public void doRun() {
        long serverId = ConfigHelper.getLong("serverId");
        int num = UserMgr.getRegisterNum();
        getLOGGER().info("upload register num, {} {}", serverId, num);
        RedisServerRegisterPlayerNumHelper.setRegisterNum(serverId, num);
    }
}
